package com.ericsson.enap.modules.enm.service.impl;

import com.ericsson.enap.modules.enm.entity.EnipEnmAlarmData;
import com.ericsson.enap.modules.enm.mapper.EnipEnmAlarmDataMapper;
import com.ericsson.enap.modules.enm.service.IEnipEnmAlarmDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 告警数据Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-25
 */
@Service
public class EnipEnmAlarmDataServiceImpl implements IEnipEnmAlarmDataService {

    @Autowired
    private EnipEnmAlarmDataMapper enipEnmAlarmDataMapper;

    /**
     * 查询告警数据
     *
     * @param id 告警数据ID
     * @return 告警数据
     */
    @Override
    public EnipEnmAlarmData selectEnipEnmAlarmDataById(Long id) {
        return enipEnmAlarmDataMapper.selectEnipEnmAlarmDataById(id);
    }

    /**
     * 查询告警数据列表
     *
     * @param enipEnmAlarmData 告警数据
     * @return 告警数据
     */
    @Override
    public List<EnipEnmAlarmData> selectEnipEnmAlarmDataList(EnipEnmAlarmData enipEnmAlarmData) {
        return enipEnmAlarmDataMapper.selectEnipEnmAlarmDataList(enipEnmAlarmData);
    }

    /**
     * 新增告警数据
     *
     * @param enipEnmAlarmData 告警数据
     * @return 结果
     */
    @Override
    public int insertEnipEnmAlarmData(EnipEnmAlarmData enipEnmAlarmData) {
        return enipEnmAlarmDataMapper.insertEnipEnmAlarmData(enipEnmAlarmData);
    }

    /**
     * 修改告警数据
     *
     * @param enipEnmAlarmData 告警数据
     * @return 结果
     */
    @Override
    public int updateEnipEnmAlarmData(EnipEnmAlarmData enipEnmAlarmData) {
        return enipEnmAlarmDataMapper.updateEnipEnmAlarmData(enipEnmAlarmData);
    }

    /**
     * 批量删除告警数据
     *
     * @param ids 需要删除的告警数据ID
     * @return 结果
     */
    @Override
    public int deleteEnipEnmAlarmDataByIds(Long[] ids) {
        return enipEnmAlarmDataMapper.deleteEnipEnmAlarmDataByIds(ids);
    }

    /**
     * 删除告警数据信息
     *
     * @param id 告警数据ID
     * @return 结果
     */
    @Override
    public int deleteEnipEnmAlarmDataById(Long id) {
        return enipEnmAlarmDataMapper.deleteEnipEnmAlarmDataById(id);
    }
}
